home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / CPP / WCLASS95.ZIP / VC2HDEX.SCT < prev    next >
Encoding:
Text File  |  1995-09-11  |  5.4 KB  |  135 lines

  1. // Class: CLASS_NAME            Visual C++ Windows Exe
  2.  
  3. #ifndef __$CAPITALIZE_ALL$CLASS_NAME$_H  //Required for current class
  4.   #define __$CAPITALIZE_ALL$CLASS_NAME$_H
  5.  
  6. [                               //Required for base classes
  7. #ifndef __$CAPITALIZE_ALL$BASE_CLASS$_H
  8.   #include "$BASE_CLASS$.h"
  9. #endif
  10. ]                               
  11.                 
  12. [#include <INCLUDE_FILE>   //Required for include files, eg <CList.h>
  13. ]                               
  14.  
  15. [                               //Required for 1:1 associated classes
  16. #ifndef __$CAPITALIZE_ALL$ASSOCIATION_ONE_CLASS$_H
  17.   #include "$ASSOCIATION_ONE_CLASS.h"
  18. #endif
  19. ]                                                               
  20.  
  21. [                               //Required for 1:1 aggregation (part) classes
  22. #ifndef __$CAPITALIZE_ALL$AGGREGATION_ONE_CLASS$_H
  23.   #include "$AGGREGATION_ONE_CLASS$.h"
  24. #endif
  25. ]                                                               
  26.  
  27. [                               //Required for 1:M associated classes
  28. #ifndef __$CAPITALIZE_ALL$ASSOCIATION_MANY_CLASS$_H
  29.   #include "$ASSOCIATION_MANY_CLASS$.h"
  30. #endif
  31. ]                                                               
  32.  
  33. [                               //Required for 1:M aggregation (part) classes
  34. #ifndef __$CAPITALIZE_ALL$AGGREGATION_MANY_CLASS$_H
  35.   #include "$AGGREGATION_MANY_CLASS$.h"
  36. #endif
  37. ]
  38.             
  39. class CLASS_NAME[NO_RETURN NO_REPEAT: NO_REPEAT public BASE_CLASS ,DELETE_LAST_SYMBOL] CLASS_LIBRARY_BASE_CLASS     
  40. { [ATTRIBUTE_TYPE ATTRIBUTE_NAME$;]
  41.   [ASSOCIATION_ONE_CLASS$* ASSOCIATION_ONE_NAME$;]
  42.   [AGGREGATION_ONE_CLASS AGGREGATION_ONE_NAME$;]
  43.   [CList <ASSOCIATION_MANY_CLASS, ASSOCIATION_MANY_CLASS&> ASSOCIATION_MANY_NAME;]
  44.   [CList <AGGREGATION_MANY_CLASS, AGGREGATION_MANY_CLASS&> AGGREGATION_MANY_NAME;]
  45. public:
  46.             //Default constructor
  47.             //Update to access base class attributes 
  48.             //Update to access 1:1 part class attributes 
  49.             //Update to access 1:M part class attributes
  50.             //Update to access 1:1 associated class attributes
  51.             //Update to access 1:M associated class attributes
  52.             //Ensure initial values entered
  53.   CLASS_NAME () :[NO_RETURN ATTRIBUTE_NAME(ATTRIBUTE_INITIAL_VALUE),DELETE_LAST_SYMBOL]  { } 
  54.  
  55.             //Constructor with arguments
  56.   CLASS_NAME ([NO_RETURN ATTRIBUTE_TYPE a$ATTRIBUTE_NAME,DELETE_LAST_SYMBOL] )       
  57.   : [NO_RETURN ATTRIBUTE_NAME (a$ATTRIBUTE_NAME),DELETE_LAST_SYMBOL] { }        
  58.             
  59.   
  60.             //Copy constructor
  61.             //Update to access 1:M part class attributes
  62.             //Update to access 1:1 associated class attributes
  63.             //Update to access 1:M associated class attributes      
  64.   CLASS_NAME (const CLASS_NAME$& a$CLASS_NAME ) [NO_RETURN NO_REPEAT: BASE_CLASS (a$CLASS_NAME),DELETE_LAST_SYMBOL]
  65.   { [  ATTRIBUTE_NAME = a$CLASS_NAME$.$ATTRIBUTE_NAME;]
  66.     [AGGREGATION_ONE_NAME = a$CLASS_NAME$.$AGGREGATION_ONE_NAME;]            
  67.   }                                     
  68.  
  69.             //Operator= Assignment Operator
  70.             //Update to access 1:M part class attributes
  71.             //Update to access 1:1 associated class attributes
  72.             //Update to access 1:M associated class attributes      
  73.   CLASS_NAME operator= (const CLASS_NAME$& a$CLASS_NAME)
  74.   { if (this == &a$CLASS_NAME) return *this;          
  75.   [BASE_CLASS$::operator= (a$CLASS_NAME);]
  76.   [ATTRIBUTE_NAME = a$CLASS_NAME$.$ATTRIBUTE_NAME;]
  77.   [AGGREGATION_ONE_NAME = a$CLASS_NAME$.$AGGREGATION_ONE_NAME;]      
  78.   return *this;                                                                                                 
  79.   }                                     
  80.  
  81.             //Operator== Equality Operator
  82.             //Update to access 1:M part class attributes
  83.             //Update to access 1:1 associated class attributes
  84.             //Update to access 1:M associated class attributes      
  85.   int operator== (const CLASS_NAME$& a$CLASS_NAME)
  86.   { return (
  87. [  (BASE_CLASS$::operator== (a$CLASS_NAME)) &&]
  88. [  (AGGREGATION_ONE_NAME == a$CLASS_NAME$.$AGGREGATION_ONE_NAME) &&]
  89. [  (ATTRIBUTE_NAME == a$CLASS_NAME$.ATTRIBUTE_NAME) &DELETE_LAST_SYMBOL&DELETE_LAST_SYMBOL]
  90.   );
  91.   }                             
  92.     
  93. [                       //Get accessor function for attribute
  94.   ATTRIBUTE_TYPE get$ATTRIBUTE_NAME$() const
  95.   {return ATTRIBUTE_NAME$;
  96.   }
  97. ]                       
  98.             
  99. [                       //Set accessor function for attribute
  100.   void set$ATTRIBUTE_NAME ($ATTRIBUTE_TYPE a$ATTRIBUTE_NAME$)
  101.   { ATTRIBUTE_NAME = a$ATTRIBUTE_NAME$;
  102.   }
  103. ]                       
  104.  
  105. [                       //Get accessor function for 1:1 aggregation
  106.   AGGREGATION_ONE_CLASS$& get$AGGREGATION_ONE_NAME$() 
  107.   {return AGGREGATION_ONE_NAME$;
  108.   }
  109. ]                       
  110.             
  111. [                       //Set accessor function for 1:1 aggregation
  112.   void set$AGGREGATION_ONE_NAME ($AGGREGATION_ONE_CLASS$& a$AGGREGATION_ONE_NAME$)
  113.   { AGGREGATION_ONE_NAME = a$AGGREGATION_ONE_NAME$;
  114.   }
  115. ]                       
  116.  
  117. [                       //Get accessor function for 1:1 association
  118.   ASSOCIATION_ONE_CLASS$* get$ASSOCIATION_ONE_NAME$() const
  119.   {return ASSOCIATION_ONE_NAME$;
  120.   }
  121. ]                       
  122.             
  123. [                       //Set accessor function for 1:1 association
  124.   void set$ASSOCIATION_ONE_NAME ($ASSOCIATION_ONE_CLASS$* a$ASSOCIATION_ONE_NAME$)
  125.   { ASSOCIATION_ONE_NAME = a$ASSOCIATION_ONE_NAME$;
  126.   }
  127. ]
  128.         
  129. [  CPP_OPERATION_VIRTUAL CPP_OPERATION_STATIC OPERATION_RETURN_TYPE OPERATION_NAME (CPP_OPERATION_PARAMETERS) CPP_OPERATION_CONSTANT CPP_OPERATION_PURE_VIRTUAL;
  130.  
  131.   OPERATION_CPP_VIRTUAL_BASE_CLASS ~ CLASS_NAME ( ) { }       //Destructor
  132. };
  133.  
  134. #endif